pacman::p_load(stringr, tidyverse, scales, tidytable, deeptime, purrr, ggplot2, ggtext, glue)
params <- "k40_var0.05"
dtm_run_path <- "coal_output/dtm/run_21Sep//all_2a_min_freq_150_21_09_21/"
docs_file <- "id_alliance_all_2a.csv"
source('scripts/report/coal_topics_FUNS.R')
paragraphs_df <- fread.(paste0("coal_data/04_model_inputs/preprocessed_datasets/", docs_file)) %>%
select.(-contains("lucy"))
dividing the counts of paragraphs discussing coal by the number of bills passed in parliament that year as a proxy for parliamentary activity. The results are then normalised so that 1 corresponds to the largest amount of discussion by any party, which corresponds to the Greens in 2019. Parliament has arguably become more active over time in part due to an increase in the number of MPs and Senators and in part due to the increased requirements of a larger population and a more complex economy.
With those differences taken into account, the periods between 1940 and 1960 and post-2005 stand out, corresponding respectively to
1902, 1929, 1942, 1944, 1945, 1946, 1947, 1948, 1949, 1950, 1951, 1959, 1961, 2006, 2007, 2008, 2009, 2011, 2012, 2013, 2014, 2015, 2017, 2018, 2019, 2020
filtering the minimal part of “other” in the period prior to 1975 and in general any topic before 1910 because the amounts of information are tiny and lead to wild fluctuations in proportion.
# From this article https://www.blueprintinstitute.org.au/polling_data
coal_mining_regions <- "Kalgoorlie|Parkes|Lyne|Hunter|calare|shortland|Flynn|Maranoa|gippsland|connor|capricornia"
all_topic_scores_df <- paragraphs_df %>%
select.(doc_id, electorate, final_alliance, year) %>%
left_join.(select.(topic_distributions, -c(V1, year))) %>%
pivot_longer.(c(`0`:sym(topic_nums)), names_to = "topic_no", values_to = "score") %>%
mutate.(topic_no = as.integer(topic_no)) %>%
left_join.(topic_labels) %>%
left_join.(select(elections, year, era, legislature)) %>%
filter.(year > minimum_display_year,
!(final_alliance == "Other" & year < 1975)) %>%
mutate.(label = paste0(str_pad(topic_no, 2, "left", "0"), "_", label),
mining_region = str_detect(electorate, regex(coal_mining_regions, ignore_case = T)),
labor_mining_region = final_alliance == "Labor" & mining_region == TRUE,
country_mining_region = final_alliance == "Country" & mining_region == TRUE)
(Replicating MH’s Fig. 10)
Differences range: -3.697844 6.038361 [1] “goldenrod3” “darkgreen” “firebrick” “blue”
[5] “black” “darkgoldenrod4” “darkred”
[1] “Country”
[2] “Greens”
[3] “Labor”
[4] “Liberal”
[5] “Other”
[6] “Country
coal” [7] “Labor
coal”
best used to “confirm” that we’re not selecting the wrong thing.
00_transport01_national procurement
02_electorate
03_procedural statements
04_carbon price
05_Victorian brown coal
06_coal supply
07_QLD and WA resources
08_elections & policy
09_budget
10_Committee on Coal
11_environmental impacts
12_interstate trade
13_trade partners (UK, JPN, CHN)
14_renewable energy projects
15_export
16_research
17_welfare
18_big business influence
19_commonwealth vs states (JCB)
20_water and farming
21_arbitration
22_employee entitlements
23_excise and duties
24_nuclear power
25_procedural statements
26_taxes
27_coal miners
28_commissions and committees
29_other fuels
30_employment
31_production
32_electricity generation
33_Asian opportunities
34_infrastructure
35_bills and measures
36_industrial relations
37_iron and steel
38_procedural statements
39_climate change
00_transport01_national procurement
02_electorate
03_procedural statements
04_carbon price
05_Victorian brown coal
06_coal supply
07_QLD and WA resources
08_elections & policy
09_budget
10_Committee on Coal
11_environmental impacts
12_interstate trade
13_trade partners (UK, JPN, CHN)
14_renewable energy projects
15_export
16_research
17_welfare
18_big business influence
19_commonwealth vs states (JCB)
20_water and farming
21_arbitration
22_employee entitlements
23_excise and duties
24_nuclear power
25_procedural statements
26_taxes
27_coal miners
28_commissions and committees
29_other fuels
30_employment
31_production
32_electricity generation
33_Asian opportunities
34_infrastructure
35_bills and measures
36_industrial relations
37_iron and steel
38_procedural statements
39_climate change